<?php
/**
 * Created by PhpStorm.
 * User: Mloong
 * Date: 2019/4/17
 * Time: 9:53
 */

namespace app\api\controller\v1;


use app\api\controller\BaseController;
use app\api\validate\TourismData;
use app\api\model\Tourism as TourismModel;
use app\lib\exception\CountException;

class Tourism extends BaseController
{
    public function Tourism()
    {
        $data = (new TourismData()) -> goCheck();
        $result = TourismModel::saveData($data);
        if($result == false){
            throw new CountException();
        }
        return json([
            'code'=> 200
        ],'200');
    }

}